﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace org.webguvenligi.NSecureImageLib.GraphicFileFormats.PNG.Compression
{
    /// <summary>
    /// This Parts Are Taken From IBM's SWT Implementation Engine
    /// </summary>
    public class PngChunkReader
    {
        List<PNGBaseChunk> _baseChunkList;
        List<PNGBaseChunk>.Enumerator _currentEnum;
        public PngChunkReader(List<PNGBaseChunk> baseChunkList)
        {
            _baseChunkList = baseChunkList;
            _currentEnum = baseChunkList.GetEnumerator();
        }
        public PNGBaseChunk readNextChunk()
        {
            if (_currentEnum.MoveNext())
                return _currentEnum.Current;
            else
                return null;
        }
    }
}